package demo;

/**
 *   土地类
 */
public class Land {

    public boolean isIdle() {
        return idle;
    }

    public void setIdle(boolean idle) {
        this.idle = idle;
    }

    //是否空闲
    public  boolean idle=true;


    //种植方法
    public  void plant(Crop crop){
            if(!idle){
                System.out.println("当前土地已被种植,请更换");
            }else {
                idle=false;
                crop.print();
            }
    }

    //查看生长状态
    public  void checkGrowReport(Crop crop,int day){
      if(!idle){
          crop.printGrowReport(day);
      }else {
          System.out.println("您尚未种植任何农作物！");
      }
    }

    //收获方法
    public  void harvestCrop(){

    }


    public  void  Call(Crop crop){
        System.out.println("动物在叫");
        crop.Call();
    }


}
